package com.orphan.audit.service.impl;

import com.orphan.audit.dao.SupplierMapper;
import com.orphan.audit.po.UserDetail;
import com.orphan.audit.dao.UserDetailMapper;
import com.orphan.audit.service.IUserDetailService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author yichen
 * @since 2021-07-14
 */
@Service
public class UserDetailServiceImpl extends ServiceImpl<UserDetailMapper, UserDetail> implements IUserDetailService {

    @Autowired
    private UserDetailMapper userDetailMapper;

    @Override
    public List<UserDetail> getAll() {
        List<UserDetail> userDetails = userDetailMapper.getAll();
        return userDetails;
    }

    @Override
    public boolean update(UserDetail userDetail) {
        int i = userDetailMapper.update(userDetail);
        return i > 0 ?true:false;
    }
}
